#ifndef HEAD_Q_H
#define HEAD_Q_H

#ifndef HEAD_H
#include "head.h"
#endif

#define GAME_WIDTH 1080
#define GAME_HEIGHT 648
#define GAME_RATE 10

// src
#define MAIN_BG ":resource/img/map.png"
#define GAME_ICON ":resource/img/logo.png"
#define BUILDING_ICON_SRC ":resource/img/building_icons"
#define BUILDING_IMG_SRC ":resource/img/buildings"
#define STATIC_CARGO_SRC ":resource/img/static_cargo"
#define CARGO_SRC ":resource/img/cargo"

// 每个格子的像素数目 用于计算
#define BOX_LENTH 192
#define CARGO_SHOW_LENTH 160

#include <QPixmap>

/// 渲染层级：越大越上
// 鼠标
#define MOUSE_ITEM_LEVEL 2
// 正常设施
#define NORMAL_FACILITY_LEVEL 1.5
// 货物
#define CARGO_LEVEL 1
// 传送带
#define BELT_LEVEL 0.5
// 地图
#define MAP_LEVEL 0
inline Coordinate QPointFToCoordinate(qreal x, qreal y){
    return Coordinate(x / BOX_LENTH, y / BOX_LENTH);
}

#endif // HEAD_Q_H
